import cx from 'classnames';
import { Icon } from '@/Icon';
import React from 'react';

interface ISlideOperationProps {
  disablePrev: boolean;
  disableNext: boolean;
  onPrevChange: () => void;
  onNextChange: () => void;
}

function SlideOperation({
                          disablePrev,
                          disableNext,
                          onPrevChange,
                          onNextChange,
                        }: ISlideOperationProps) {
  return (
    <>
      <Icon type='left'
            className={
              cx({
                'icon-disabled': disablePrev,
              })}
            onClick={onPrevChange}
      />
      <Icon type='right'
            className={cx({
              'icon-disabled': disableNext,
            })}
            onClick={onNextChange}
      />
    </>
  );
}
